﻿<Window x:Class="DaphneForms.EngineMatchForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:loc="http://schemas.tomer.com/winfx/2006/xaml/presentation"       
        xmlns:ctrl = "clr-namespace:DaphneControls;assembly=DaphneControls"       
        xmlns:ignore="http://www.ignore.com"
        mc:Ignorable="d ignore" Width="650" Height="450" Title="{loc:Translate Default='Engine Match Configuration'}"
         WindowStartupLocation="CenterOwner" >

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*" />
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        
        <!-- Engine configuration -->
        <Grid Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="45" />
                <RowDefinition Height="1*" />
                <RowDefinition Height="1*" />
            </Grid.RowDefinitions>
            
            <!-- Match Settings -->
            <GroupBox Header="{loc:Translate Default='Match Configuration'}" Grid.Row="0">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="90" />
                        <ColumnDefinition Width="150" />
                        <ColumnDefinition Width="60" />
                        <ColumnDefinition Width="50" />
                    </Grid.ColumnDefinitions>                   
                    
                    <TextBlock Text="{loc:Translate Default='Checkers Type:'}" Grid.Column="0" VerticalAlignment="Center" />
                    <ComboBox Grid.Column="1" Width="150" Height="20"  VerticalAlignment="Center"
                              ItemsSource="{Binding Path=CheckersTypes}" SelectedItem="{Binding Path=SelectedCheckers, Mode=TwoWay}" />
                    <TextBlock Grid.Column="2" Text="{loc:Translate Default='Rounds:'}" VerticalAlignment="Center" Margin="8,0,0,0" />
                    <TextBox Grid.Column="3" Width="50" VerticalAlignment="Center" Height="20" Text="{Binding Path=NumRounds, Mode=TwoWay, StringFormat=n}" />
                    
                    
                </Grid>                
            </GroupBox>           
            
            <!-- White Side Config -->
            <GroupBox Header="{loc:Translate Default='Engine for white side'}" Grid.Row="1">
                <ctrl:EngineConfiguration DataContext="{Binding Path=WhiteConfig}" />                
            </GroupBox>

            <!-- Black Side Config -->
            <GroupBox Header="{loc:Translate Default='Engine for black side'}" Grid.Row="2">
                <ctrl:EngineConfiguration DataContext="{Binding Path=BlackConfig}" />
            </GroupBox>
        </Grid>
        
        <!-- Buttons -->
        <StackPanel Grid.Column="1" Margin="0,5,0,0">
            <Button Width="100" Content="{loc:Translate Default='Run Match'}" Margin="5" Command="{Binding Path=RunMatchCommand}" />
            <Button Width="100" Content="{loc:Translate Default=Cancel}" Margin="5" Command="{Binding Path=CancelCommand}"/>
        </StackPanel>
        
    </Grid>
</Window>
